{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
}}

<PageHeader as |p|>
  <p.top>
    <Hds::Breadcrumb>
      <Hds::Breadcrumb::Item
        @text="{{uppercase this.policyType}} policies"
        @route="vault.cluster.policies"
        @model={{this.policyType}}
        data-test-policy-list-link
      />
      <Hds::Breadcrumb::Item @text="Create" @current={{true}} />
    </Hds::Breadcrumb>
  </p.top>
  <p.levelLeft>
    <h1 class="title is-3">
      Create
      {{uppercase this.policyType}}
      Policy
    </h1>
  </p.levelLeft>
</PageHeader>

<hr class="has-background-gray-300 is-marginless" />

<PolicyForm
  @model={{this.model}}
  @onSave={{transition-to "vault.cluster.policy.show" this.model.policyType this.model.name}}
  @onCancel={{transition-to "vault.cluster.policies.index"}}
  @renderPolicyExampleModal={{true}}
/>